<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_user_rebate_record".
 *
 * @property integer $id
 * @property integer $fuserid
 * @property string $fusername
 * @property integer $tuserid
 * @property string $tusername
 * @property double $amount
 * @property double $rebate_type
 * @property double $rebate_amount
 * @property integer $created_at
 * @property integer $updated_at
 */
class UserRebateRecord extends \yii\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'me_user_rebate_record';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['fuserid', 'fusername', 'tuserid', 'tusername', 'amount', 'rebate_amount'], 'required'],
            [['fuserid', 'tuserid',  'created_at', 'updated_at'], 'integer'],
            [['amount','rebate_amount'], 'number'],
            [['fusername', 'tusername'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => '自增ID',
            'fuserid' => '刷手账号ID',
            'fusername' => '刷手账号',
            'tuserid' => '刷手推荐人ID',
            'tusername' => '刷手推荐人账号',
            'amount' => '任务金额',
            'rebate_type' => "返利类型",
            'rebate_amount' => '返利金额',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
